Parametric Compositional Data Types
نویسندگان
چکیده
In previous work we have illustrated the benefits that compositional data types (CDTs) offer for implementing languages and in general for dealing with abstract syntax trees (ASTs). Based on Swierstra’s data types à la carte, CDTs are implemented as a Haskell library that enables the definition of recursive data types and functions on them in a modular and extendable fashion. Although CDTs provide a powerful tool for analysing and manipulating ASTs, they lack a convenient representation of variable binders. In this paper we remedy this deficiency by combining the framework of CDTs with Chlipala’s parametric higher-order abstract syntax (PHOAS). We show how a generalisation from functors to difunctors enables us to capture PHOAS while still maintaining the features of the original implementation of CDTs, in particular its modularity. Unlike previous approaches, we avoid so-called exotic terms without resorting to abstract types: this is crucial when we want to perform transformations on CDTs that inspect the recursively computed CDTs, e.g. constant folding.
منابع مشابه
Developing a Compositional Reservoir Model for Investigating the Effect of Interfacial Tension on Oil Recovery
In this paper, a simplified formulation for compositional reservoir simulator is presented. These types of simulators are used when inter-phase mass transfer depends on phase composition as well as pressure. The procedure for solving compositional model equations is completely described. For equilibrium calculation, property estimation Peng Robinson equation of state is used. This equation ...
متن کاملRealizability and Compositional Compiler Correctness for a Polymorphic Language
We construct operationally-based realizability relations between phrases in a language with both universal and existential types and programs for a variant SECD machine. The relations, defined using parametricity, biorthogonality and step-indexing, give extensional and compositional specifications of when low-level code and values realize typed source-level terms. We prove full functional corre...
متن کاملsurvey and analysis of purposes of compositional sentences in Asra sureh
Abstract: The men of eloquence divide the word in respect of capebility of truth and mendacity to report and composition.on the conterary of compositional sentence ,report sentence is not truthful and mendacious. It consists five types of imperative,interdictional,interrogational,supplicational and vocative.some compositional sentences have secondary purpose.Asra,the seventeenth sureh of Holy ...
متن کاملTypology of Adjectives Benchmark for Compositional Distributional Models
In this paper we present a novel application of compositional distributional semantic models (CDSMs): prediction of lexical typology. The paper introduces the notion of typological closeness, which is a novel rigorous formalization of semantic similarity based on comparison of multilingual data. Starting from the Moscow Database of Qualitative Features for adjective typology, we create four dat...
متن کاملThe Inverse Compositional Algorithm for Parametric Registration
We present an implementation of the inverse compositional algorithm for parametric motion estimation. It computes a global motion between two images using a non-linear least square technique. Our implementation allows computing several types of planar transformations, such as translations, similarities, affinities or homographies. The algorithm is iterative so it typically yields solutions with...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2011